import { ColumnGroupType, ColumnType } from "antd/es/table"

import { renderNullableValue } from "./venueProfitAndLoss"

const memberReturnData = (newFormat: (arg: string) => string): Record<string, ColumnGroupType<any> | ColumnType<any>> => ({
	memberReturnDataStaticDate: {
		key: "staticsDate",
		dataIndex: "staticsDate",
		width: 100,
		render: renderNullableValue("staticsDate"),
		title: newFormat("report.mrd_staticsDate"),
		align: "center",
		fixed: false
		// defaultSortOrder: "descend",
		// sorter: (a, b) => a.staticsDate - b.staticsDate
	},
	memberReturnDataMemberName: {
		key: "memberName",
		dataIndex: "memberName",
		width: 200,
		render: renderNullableValue("memberName"),
		title: newFormat("report.mrd_memberName"),
		align: "center",
		fixed: false
	},
	memberReturnDataParentProxyName: {
		key: "parentProxyName",
		dataIndex: "parentProxyName",
		width: 200,
		render: renderNullableValue("parentProxyName"),
		title: newFormat("report.mrd_parentProxyName"),
		align: "center",
		fixed: false
	},
	memberReturnDataTopProxyName: {
		key: "topProxyName",
		dataIndex: "topProxyName",
		width: 200,
		render: renderNullableValue("topProxyName"),
		title: newFormat("report.mrd_topProxyName"),
		align: "center",
		fixed: false
	},
	memberReturnDataRebateAmount: {
		key: "rebateAmount",
		dataIndex: "rebateAmount",
		width: 200,
		render: renderNullableValue("rebateAmount", "$"),
		title: newFormat("report.mrd_rebateAmount"),
		align: "center",
		fixed: false
	},
	memberReturnDataRebateAmountDxClub: {
		key: "rebateAmountDxClub",
		dataIndex: "rebateAmountDxClub",
		width: 150,
		render: renderNullableValue("rebateAmountDxClub", "$"),
		title: newFormat("report.mrd_rebateAmountDxClub"),
		align: "center",
		fixed: false
	},
	memberReturnDataRebateAmountZr: {
		key: "rebateAmountZr",
		dataIndex: "rebateAmountZr",
		width: 230,
		render: renderNullableValue("rebateAmountZr", "$"),
		title: newFormat("report.mrd_rebateAmountZr"),
		align: "center",
		fixed: false
	},
	memberReturnDataRebateAmountTy: {
		key: "rebateAmountTy",
		dataIndex: "rebateAmountTy",
		width: 230,
		render: renderNullableValue("rebateAmountTy", "$"),
		title: newFormat("report.mrd_rebateAmountTy"),
		align: "center",
		fixed: false
	},
	memberReturnDataRebateAmountCp: {
		key: "rebateAmountCp",
		dataIndex: "rebateAmountCp",
		width: 230,
		render: renderNullableValue("rebateAmountCp", "$"),
		title: newFormat("report.mrd_rebateAmountCp"),
		align: "center",
		fixed: false
	},
	memberReturnDataRebateAmountQp: {
		key: "rebateAmountQp",
		dataIndex: "rebateAmountQp",
		width: 230,
		render: renderNullableValue("rebateAmountQp", "$"),
		title: newFormat("report.mrd_rebateAmountQp"),
		align: "center",
		fixed: false
	},
	memberReturnDataRebateAmountDj: {
		key: "rebateAmountDj",
		dataIndex: "rebateAmountDj",
		width: 230,
		render: renderNullableValue("rebateAmountDj", "$"),
		title: newFormat("report.mrd_rebateAmountDj"),
		align: "center",
		fixed: false
	},
	memberReturnDataRebateAmountDy: {
		key: "rebateAmountDy",
		dataIndex: "rebateAmountDy",
		width: 230,
		render: renderNullableValue("rebateAmountDy", "$"),
		title: newFormat("report.mrd_rebateAmountDy"),
		align: "center",
		fixed: false
	}
})

export default memberReturnData
